<template>
  <div style="padding: 20px 0">
    <van-tabs v-if="['/me/wallet/rechargeRecord', '/me/wallet/withdrawRecord'].includes($route.path)" v-model="activeTab" title-active-color="#d62014" color="#d62014" @change="tabChange">
      <van-tab name="rechargeRecord" :title="$t('充值记录')"></van-tab>
      <van-tab name="withdrawRecord" :title="$t('提现记录')"></van-tab>
    </van-tabs>
    <router-view></router-view>
  </div>
</template>

<script>
import { Tab, Tabs } from 'vant';
export default {
  components: {
    [Tab.name]: Tab,
    [Tabs.name]: Tabs
  },
  data() {
    return {
      activeTab: 'rechargeRecord'
    }
  },
  methods: {
    tabChange() {
      this.$router.push({
        path: `/me/wallet/${this.activeTab}`
      })
    }
  }
}
</script>

<style scoped lang="scss">
::v-deep .van-tab__text{
  font-size: 18px !important;
  //font-weight: bold;
}
</style>
